capture log close
set more off
clear all

* Set path to replication folder here
global user="/Users/elies/Dropbox/Climate fairness/06 Empirics/05 DCP data/07 Replication NComms"

cd "$user"
global data="$user/02 Data"
global output="$user/03 Results"
cd "$user/01 Code/"

*=============================================================================

* Load pooled data
use "$data/pooled_touse.dta"
svyset caseid [pweight=weight]
local socdem="female age3549 age5064 age65above inc_lomed_wm inc_loup_wm inc_hi_wm inc_miss_wm unempl school_medtier school_hightier"
local socdemnoinc="female age3549 age5064 age65above inc_miss_wm unempl school_medtier school_hightier"

bysort country: tab CCBE_degree

* Drop US observations because multilateralism experiment was not included in that portion of the survey
drop if country==1

* Label treatment variable: multilateralism
label var Dmult "Multilateralism"
lab define Dmult_lab 0 "Unilateral" 1 "Multilateral"
lab values Dmult Dmult_lab

* Binary version of support for climate tax
label var cace_disapproval "Carbon Tax: Level of Disapproval"
recode cace_disapproval (1=10) (2=9) (3=8) (4=7) (5=6) (6=5) (7=4) (8=3) (9=2) (10=1), gen(ctaxapprove)
gen cace_approval_high=.
replace cace_approval_high=0 if ctaxapprove<=5
replace cace_approval_high=1 if ctaxapprove>5 & ctaxapprove<=10
label var cace_approval_high "Carbon Tax Approval: High"
gen cace_approval_highX100=cace_approval_high*100

* Treatment indicators effectiveness primes 
*D_info_higheff
*D_info_loweff
*D_info_3
gen D_info_none=D_info_3

* Variables for eliminated effects
gen DmultXnoinfo = Dmult * D_info_none
gen EE_low = DmultXnoinfo
label var EE_low "Elim Eff: ATE-ACDE(Low)"
gen EE_high = DmultXnoinfo
label var EE_high "Elim Eff: ATE-ACDE(High)"

* Test whether multilateralism effect on carbon tax approval 
* is moderated by effectiveness prime
* Generate interactions
gen DmultXD_info_loweff=Dmult*D_info_loweff
gen DmultXD_info_higheff=Dmult*D_info_higheff
gen DmultXD_info_none=Dmult*D_info_none

* Create auxiliary multilateralism treatment variable label so that informative axis labels for plot
gen Dmult_pool=Dmult
label var Dmult_pool "Pooled"
gen Dmult_none=Dmult
label var Dmult_none "Multilateralism (ATE)"
gen Dmult_loweff=Dmult
label var Dmult_loweff "Multil: Low Effectiveness (ACDE)"
gen Dmult_higheff=Dmult
label var Dmult_higheff "Multil: High Effectiveness (ACDE)"

local lw1="*3"
local lw2="*3"
local ms="*1"

*=============================================================================

*** Multilateralims Treatment

* Auxiliary effectiveness treatment level var
* 1 control
* 2 effect high
* 3 effect low
recode cace_info 1=3 2=2 3=1, gen(cace_info_aux)
lab define cace_aux_lab 1 Control 2 "Eff: High" 3 "Eff: Low"
lab values cace_info_aux cace_aux_lab

* Figure 1a
cibar cace_approval_high [pweight = weight], ///
over1(Dmult) over2(cace_info_aux) ///
barcol(dknavy*.4 dknavy*.9) ///
graphopts(name(Fig1a) ///
note("(a) Proportion Supporting a Carbon Tax by Multilateralism and Effectiveness Treatment Condition") ///
ytitle(Support for Carbon Tax (Proportion)) ///
ytitle("Mean Carbon Tax Support (% Approve)") ///
ylabel(0(.1)0.7) graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white))) ///
ciopts(lcolor(black)) ///
barlabel(on) blgap(0.05)  blsize(small)

* Supplementary Figure 1a (unweighted version)
cibar cace_approval_high, ///
over1(Dmult) over2(cace_info_aux) ///
barcol(dknavy*.4 dknavy*.9) ///
graphopts(name(SuppFig1a) ///
note("(a) Proportion Supporting a Carbon Tax by Multilateralism and Effectiveness Prime") ///
ytitle(Support for Carbon Tax (Proportion)) ///
ytitle("Mean Carbon Tax Support (% Approve)") ///
ylabel(0(.1)0.7) graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white))) ///
ciopts(lcolor(black)) ///
barlabel(on) blgap(0.05)  blsize(small)

* Supplementary Figure 2a (by country)
cibar cace_approval_high [pweight = weight], ///
over1(Dmult) over2(cace_info_aux) over3(country)  ///
barcol(dknavy*.4 dknavy*.9) ///
graphopts(name(SuppFig2a) ///
note("(a) Proportion Supporting a Carbon Tax by Multilateralism and Effectiveness Prime") ///
ytitle(Support for Carbon Tax (Proportion)) ///
ytitle("Mean Carbon Tax Support (% Approve)") ///
ylabel(0(.1)0.7) xlabel(,labsize(small))  ///
graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white))) ///
ciopts(lcolor(black)) ///
barlabel(on) blgap(0.07)  blsize(vsmall)


*=============================================================================

*** Eliminated Effects

* Figure 1b

foreach Y in cace_approval_high {
svy: regress `Y' Dmult_pool `socdem' dd_GE dd_UK
eststo `Y'_pool_w

svy: regress `Y' Dmult_none `socdem' dd_GE dd_UK if D_info_none==1
eststo `Y'_noinfo_w

svy: regress `Y' Dmult_low `socdem' dd_GE dd_UK if D_info_loweff==1
eststo `Y'_low_w

svy: regress `Y' Dmult_higheff `socdem' dd_GE dd_UK if D_info_higheff==1
eststo `Y'_high_w
}
* EE for low
svy: regress cace_approval_high Dmult D_info_none EE_low `socdem' dd_GE dd_UK if D_info_higheff == 0
eststo ee_low_w
* EE for high
svy: regress cace_approval_high Dmult D_info_none EE_high `socdem' dd_GE dd_UK if D_info_loweff == 0
eststo ee_high_w

coefplot (cace_approval_high_noinfo_w, ///
drop(`socdem' dd_GE dd_UK _cons) ///
levels(95) msize(`ms') lwidth(`lw1')) ///
(cace_approval_high_high_w, ///
drop(`socdem' dd_GE dd_UK _cons) ///
levels(95) msize(`ms') lwidth(`lw1')) ///
(ee_high_w, ///
drop(`socdem' dd_GE dd_UK D_info_none Dmult _cons) ///
levels(95) msize(`ms') mcolor(purple*.8) ciopts(lcolor(purple*.5) lwidth(`lw1'))) ///
(cace_approval_high_low_w, ///
drop(`socdem' dd_GE dd_UK _cons) ///
levels(95) msize(`ms') lwidth(`lw1')) ///
(ee_low_w, ///
drop(`socdem' dd_GE dd_UK D_info_none Dmult _cons) ///
levels(95) msize(`ms') mcolor(purple*.8) ciopts(lcolor(purple*.5) lwidth(`lw1'))) ///
,  ///
omitted baselevels ///
graphregion(fcolor(white)) ///
ylabel(, labsize(small)) ///
msize(tiny) msymbol(circle) ///
yscale(alt noline) ///
coeflabels(, notick labgap(-125)) ///
graphregion(margin(l=55) lcolor(white)) ///
mcolor(orange*.8) ciopts(lcolor(orange*.5 orange*.2) lwidth(`lw1')) ///
xlabel(, labsize(small) ///
grid glwidth(vthin) glpattern(solid)) ///
xmtick(##2, grid) ///
xline(0, lcolor(black) lwidth(vthin) lpattern(dash)) ///
legend(off) ///
xscale(r(-0.075 0.15)) ///
xtitle("Change in Carbon Tax Support (% points)", size(small)) ///
offset(0) ///
name(Fig1b)

* Supplementary Figure 1b (unweighted version)

foreach Y in cace_approval_high {
regress `Y' Dmult_pool `socdem' dd_GE dd_UK, robust
eststo `Y'_pool

regress `Y' Dmult_none `socdem' dd_GE dd_UK if D_info_none==1, robust
eststo `Y'_noinfo

regress `Y' Dmult_low `socdem' dd_GE dd_UK if D_info_loweff==1, robust
eststo `Y'_low

regress `Y' Dmult_higheff `socdem' dd_GE dd_UK if D_info_higheff==1, robust
eststo `Y'_high
}
* EE for low
regress cace_approval_high Dmult D_info_none EE_low `socdem' dd_GE dd_UK if D_info_higheff == 0, robust
eststo ee_low
* EE for high
regress cace_approval_high Dmult D_info_none EE_high `socdem' dd_GE dd_UK if D_info_loweff == 0, robust
eststo ee_high

coefplot (cace_approval_high_noinfo, ///
drop(`socdem' dd_GE dd_UK _cons) ///
levels(95) msize(`ms') lwidth(`lw1')) ///
(cace_approval_high_high, ///
drop(`socdem' dd_GE dd_UK _cons) ///
levels(95) msize(`ms') lwidth(`lw1')) ///
(ee_high, ///
drop(`socdem' dd_GE dd_UK D_info_none Dmult _cons) ///
levels(95) msize(`ms') mcolor(purple*.8) ciopts(lcolor(purple*.5) lwidth(`lw1'))) ///
(cace_approval_high_low, ///
drop(`socdem' dd_GE dd_UK _cons) ///
levels(95) msize(`ms') lwidth(`lw1')) ///
(ee_low, ///
drop(`socdem' dd_GE dd_UK D_info_none Dmult _cons) ///
levels(95) msize(`ms') mcolor(purple*.8) ciopts(lcolor(purple*.5) lwidth(`lw1'))) ///
,  ///
omitted baselevels ///
graphregion(fcolor(white)) ///
ylabel(, labsize(small)) ///
msize(tiny) msymbol(circle) ///
yscale(alt noline) ///
coeflabels(, notick labgap(-125)) ///
graphregion(margin(l=55) lcolor(white)) ///
mcolor(orange*.8) ciopts(lcolor(orange*.5 orange*.2) lwidth(`lw1')) ///
xlabel(, labsize(small) ///
grid glwidth(vthin) glpattern(solid)) ///
xmtick(##2, grid) ///
xline(0, lcolor(black) lwidth(vthin) lpattern(dash)) ///
legend(off) ///
xscale(r(-0.075 0.15)) ///
xtitle("Change in Carbon Tax Support (% points)", size(small)) ///
offset(0) ///
name(SuppFig1b)

* Supplementary Figure 2b (by country)

foreach cn in 2 3 4 {
	
svy: regress cace_approval_high Dmult_none `socdem' if D_info_none == 1 & country == `cn'
eststo c_`cn'_noinfo_w

svy: regress cace_approval_high Dmult_none `socdem' if D_info_higheff == 1 & country == `cn'
eststo c_`cn'_high_w

svy: regress cace_approval_high Dmult_none `socdem' if D_info_loweff == 1 & country == `cn'
eststo c_`cn'_low_w

svy: regress cace_approval_high Dmult D_info_none EE_low `socdem' if D_info_loweff == 0 & country == `cn'
eststo ee_`cn'_low_w

svy: regress cace_approval_high Dmult D_info_none EE_high `socdem' if D_info_loweff == 0 & country == `cn'
eststo ee_`cn'_high_w

}

* Levels
coefplot ///
(c_2_noinfo_w, drop(`socdem' _cons) levels(95) msize(`ms') lwidth(`lw2') msymbol(D)) ///
(c_2_high_w, drop(`socdem' _cons) levels(95) msize(`ms') lwidth(`lw2') msymbol(D)) ///
(ee_2_high_w, drop(`socdem'  D_info_none Dmult _cons) levels(95) msize(`ms') lwidth(`lw2') msymbol(D)) ///
(c_2_low_w, drop(`socdem' _cons) levels(95) msize(`ms') lwidth(`lw2') msymbol(D)) ///
(ee_2_low_w, drop(`socdem' D_info_none Dmult _cons) levels(95) msize(`ms') lwidth(`lw2') msymbol(D)) ///
(c_3_noinfo_w, drop(`socdem' _cons) levels(95) msize(`ms') lwidth(`lw2') msymbol(O)) ///
(c_3_high_w, drop(`socdem' _cons) levels(95) msize(`ms') lwidth(`lw2') msymbol(O)) ///
(ee_3_high_w, drop(`socdem' D_info_none Dmult _cons) levels(95) msize(`ms') lwidth(`lw2') msymbol(O)) ///
(c_3_low_w, drop(`socdem' _cons) levels(95) msize(`ms') lwidth(`lw2') msymbol(O)) ///
(ee_3_low_w, drop(`socdem' D_info_none Dmult _cons) levels(95) msize(`ms') lwidth(`lw2') msymbol(O)) ///
(c_4_noinfo_w, drop(`socdem' _cons) levels(95) msize(`ms') lwidth(`lw2') msymbol(S)) ///
(c_4_high_w, drop(`socdem' _cons) levels(95) msize(`ms') lwidth(`lw2') msymbol(S)) ///
(ee_4_high_w, drop(`socdem' D_info_none Dmult _cons) levels(95) msize(`ms') lwidth(`lw2') msymbol(S)) ///
(c_4_low_w, drop(`socdem' _cons) levels(95) msize(`ms') lwidth(`lw2') msymbol(S)) ///
(ee_4_low_w, drop(`socdem' D_info_none Dmult _cons) levels(95) msize(`ms') lwidth(`lw2') msymbol(S)) ///
,  ///
omitted baselevels ///
graphregion(fcolor(white)) ///
ylabel(, labsize(small)) ///
msize(tiny) msymbol(circle) ///
yscale(alt noline) ///
coeflabels(, notick labgap(-125)) ///
graphregion(margin(l=55) lcolor(white)) ///
mcolor(dknavy*.6) ciopts(lcolor(dknavy*.6 dknavy*.5)) ///
xlabel(, labsize(small) ///
grid glwidth(vthin) glpattern(solid)) ///
xmtick(##2, grid) ///
xline(0, lcolor(black) lwidth(vthin) lpattern(dash)) ///
xtitle("Change in Carbon Tax Support (% points)", size(small)) ///
legend(rows(1) order(2 "United Kingdom" 8 "Germany" 14 "France"))  ///
name(SuppFig2b)

graph combine Fig1a Fig1b, rows(2) altshrink ///
ysize(9) xsize(6) graphregion(margin(zero) fcolor(white)) ///
note("(b) Causal and Eliminated Effects (EE) of Multilateralism by Effectiveness Prime", pos(6) size(vsmall))
graph export "$output/Fig1.pdf", replace

graph combine SuppFig1a SuppFig1b, rows(2) altshrink ///
ysize(9) xsize(6) graphregion(margin(zero) fcolor(white)) ///
note("(b) Causal Effects of Multilateralism by Effectiveness Prime", pos(6) size(vsmall))
graph export "$output/SuppFig1.pdf", replace

graph combine SuppFig2a SuppFig2b, rows(2) altshrink ///
ysize(9) xsize(6) graphregion(margin(zero) fcolor(white)) ///
note("(b) Causal Effects of Multilateralism by Effectiveness Prime", pos(6) size(vsmall))
graph export "$output/SuppFig2.pdf", replace


*=============================================================================

*** Expected impact

* Figure 2
*quietly eststo Carbon: svy: regress ctaxapprove Dmult `socdem' dd_GE dd_UK
quietly eststo Children: svy: regress bttrlfchldrn Dmult `socdem' dd_GE dd_UK
quietly eststo Costs: svy: regress dstrbtcstsmfairly Dmult `socdem' dd_GE dd_UK
quietly eststo Save: svy: regress svanmlsplnts Dmult `socdem' dd_GE dd_UK
quietly eststo Improve: svy: regress imprvpplshealth Dmult `socdem' dd_GE dd_UK
quietly eststo More: svy: regress moregvtregltn Dmult `socdem' dd_GE dd_UK
quietly eststo Higher: svy: regress causehghrenrgyprcs Dmult `socdem' dd_GE dd_UK 
quietly eststo Job: svy: regress cstsjobshrmecon Dmult `socdem' dd_GE dd_UK

* Plotting
local lw1="*2.7"
local lw2="*2.6"
local ms="*.8"
* Grayscale
coefplot Children ///
|| Save ///
|| Improve || More ///
|| Higher || Job || Costs ///
, ///
mcolor(black) ///
bycoefs vertical ///
drop(_cons dd_GE dd_UK `socdem') legend(off) ///
graphregion(fcolor(white) lcolor(white)) ///
ylabel(-0.08(0.02)0.12, labsize(small)) ///
yline(0, lpattern(dash) lcolor(black)) ///
xline(3.5 6.5, lpattern(dot) lcolor(black)) ///
lwidth(vthin) ///
levels(95) msize(`ms') ///
mcolor(black*.85) ciopts(lcolor(black*1 black*.5) ///
lwidth(`lw1' `lw2')) ///
xlabel(, grid labsize(vsmall)) xscale(noline) ///
group(1 ="Better Life" ///
2 ="Animals/Plants" ///
3 ="Public Health" ///
4 ="Regulation" ///
5 ="Energy Prices" ///
6 ="Losses" ///
7 ="More Fairly" ///
, labsize(vsmall) nogap) ///
text( 0.12 2 "Benefits" 0.12 5 "Costs" 0.12 7 "Fairness", box bcolor(white)) ///
ytitle("Effect of Multilateralism on Pr(Agree) in points", size(medium))  
graph export "$output/Fig2.pdf", replace


* Supplementary Figure 3 (unweighted version)
*quietly eststo Carbon: regress ctaxapprove Dmult `socdem' dd_GE dd_UK
quietly eststo Children: regress bttrlfchldrn Dmult `socdem' dd_GE dd_UK
quietly eststo Costs: regress dstrbtcstsmfairly Dmult `socdem' dd_GE dd_UK
quietly eststo Save: regress svanmlsplnts Dmult `socdem' dd_GE dd_UK
quietly eststo Improve: regress imprvpplshealth Dmult `socdem' dd_GE dd_UK
quietly eststo More: regress moregvtregltn Dmult `socdem' dd_GE dd_UK
quietly eststo Higher: regress causehghrenrgyprcs Dmult `socdem' dd_GE dd_UK 
quietly eststo Job: regress cstsjobshrmecon Dmult `socdem' dd_GE dd_UK

* Plotting
* Grayscale
coefplot Children ///
|| Save ///
|| Improve || More ///
|| Higher || Job || Costs ///
, ///
mcolor(black) ///
bycoefs vertical ///
drop(_cons dd_GE dd_UK `socdem') legend(off) ///
graphregion(fcolor(white) lcolor(white)) ///
ylabel(-0.08(0.02)0.12, labsize(small)) ///
yline(0, lpattern(dash) lcolor(black)) ///
xline(3.5 6.5, lpattern(dot) lcolor(black)) ///
lwidth(vthin) ///
levels(95) msize(`ms') ///
mcolor(black*.85) ciopts(lcolor(black*1 black*.5) ///
lwidth(`lw1' `lw2')) ///
xlabel(, grid labsize(vsmall)) xscale(noline) ///
group(1 ="Better Life" ///
2 ="Animals/Plants" ///
3 ="Public Health" ///
4 ="Regulation" ///
5 ="Energy Prices" ///
6 ="Losses" ///
7 ="More Fairly" ///
, labsize(vsmall) nogap) ///
text( 0.12 2 "Benefits" 0.12 5 "Costs" 0.12 7 "Fairness", box bcolor(white)) ///
ytitle("Effect of Multilateralism on Pr(Agree) in points", size(medium))   
graph export "$output/SuppFig3.pdf", replace


* Supplementary Figure 4 (by country)

* UK (country==2)
quietly eststo Children_uk: svy: regress bttrlfchldrn Dmult `socdem' if country==2
quietly eststo Costs_uk: svy: regress dstrbtcstsmfairly Dmult `socdem' if country==2
quietly eststo Save_uk: svy: regress svanmlsplnts Dmult `socdem' if country==2
quietly eststo Improve_uk: svy: regress imprvpplshealth Dmult `socdem' if country==2
quietly eststo More_uk: svy: regress moregvtregltn Dmult `socdem' if country==2
quietly eststo Higher_uk: svy: regress causehghrenrgyprcs Dmult `socdem' if country==2
quietly eststo Job_uk: svy: regress cstsjobshrmecon Dmult `socdem' if country==2
* Germany (country==3)
quietly eststo Children_ge: svy: regress bttrlfchldrn Dmult `socdem' if country==3
quietly eststo Costs_ge: svy: regress dstrbtcstsmfairly Dmult `socdem' if country==3
quietly eststo Save_ge: svy: regress svanmlsplnts Dmult `socdem' if country==3
quietly eststo Improve_ge: svy: regress imprvpplshealth Dmult `socdem' if country==3
quietly eststo More_ge: svy: regress moregvtregltn Dmult `socdem' if country==3
quietly eststo Higher_ge: svy: regress causehghrenrgyprcs Dmult `socdem' if country==3
quietly eststo Job_ge: svy: regress cstsjobshrmecon Dmult `socdem' if country==3
* France (country==4)
quietly eststo Children_fr: svy: regress bttrlfchldrn Dmult `socdem' if country==4
quietly eststo Costs_fr: svy: regress dstrbtcstsmfairly Dmult `socdem' if country==4
quietly eststo Save_fr: svy: regress svanmlsplnts Dmult `socdem' if country==4
quietly eststo Improve_fr: svy: regress imprvpplshealth Dmult `socdem' if country==4
quietly eststo More_fr: svy: regress moregvtregltn Dmult `socdem' if country==4
quietly eststo Higher_fr: svy: regress causehghrenrgyprcs Dmult `socdem' if country==4
quietly eststo Job_fr: svy: regress cstsjobshrmecon Dmult `socdem' if country==4


coefplot (Children_uk, msymbol(D)) Children_ge Children_fr ///
|| Save_uk (Save_ge, msymbol(O)) Save_fr ///
|| Improve_uk Improve_ge (Improve_fr, msymbol(S)) ///
|| More_uk More_ge More_fr ///
|| Higher_uk Higher_ge Higher_fr ///
|| Job_uk Job_ge Job_fr ///
|| Costs_uk Costs_ge Costs_fr ///
, ///
bycoefs vertical ///
drop(_cons dd_GE dd_UK `socdem') ///
graphregion(fcolor(white) lcolor(white)) ///
yline(0, lpattern(dash) lcolor(black)) ///
xline(3.5 6.5, lpattern(dot) lcolor(black)) ///
lwidth(vthin) ///
levels(95) msize(`ms') ///
mcolor(dknavy*.6) ciopts(lcolor(dknavy*.6 dknavy*.5) ///
lwidth(`lw1' `lw2')) ///
xlabel(, grid labsize(vsmall)) xscale(noline) ///
group(1 ="Better Life" ///
2 ="Animals/Plants" ///
3 ="Public Health" ///
4 ="Regulation" ///
5 ="Energy Prices" ///
6 ="Losses" ///
7 ="More Fairly" ///
, labsize(vsmall) nogap) ///
legend(rows(1) label(2 "United Kingdom") label(4 "Germany") label(6 "France")) ///
ytitle("Effect on Pr(Agree) in points", size(small)) 
graph export "$output/SuppFig4.pdf", replace

